<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>图片管理</title>
    <!-- Le styles -->
    <link href="/common/js/bootstrap-3.0.0/css/bootstrap-united.min.css" rel="stylesheet">
    <style type="text/css">
        body {
            padding: 10px 0;
        }
    </style>
</head>
<body>
<div class="container">
<form id="form" method="post" class="well form-horizontal">
    <fieldset>
        <legend>图片管理</legend>
        <div class="form-group">
            <div class="col-md-4">
                <label class="col-md-4 control-label" for="username">登录名</label>

                <div class="col-md-8">
                    <input id="username" name="username" type="text" class="form-control"/>
                </div>
            </div>

            <div class="col-md-4">
                <label class="col-md-4 control-label" for="datetime">日期</label>

                <div class="col-md-8">
                    <input id="datetime" name="datetime" class="form-control Wdate"
                           onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
                </div>
            </div>

        </div>

        <div class="form-group">
            <div class="col-md-12 text-right">
                <a style="width: 80px;" href="/msg/addPushMsgView" class="btn btn-success">新建推送</a>
                <button type="button" id="searchBtn" style="width: 80px;" class="btn btn-primary">查询</button>
            </div>
        </div>
    </fieldset>
</form>

    <table id="resultTable" class="table table-bordered table-hover">
        <thead>
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>标题</th>
            <th>内容</th>
            <th>操作人</th>
            <th>状态</th>
            <th>详情</th>
        </tr>
        </thead>
        <tbody>
        <script type="text/html">
            <tr>
                <td>{{id}}</td>
                <td>{{name}}</td>
                <td>{{title}}</td>
                <td>{{content!''}}</td>
                <td>{{operator}}</td>
                <td>{{status}}</td>
                <td><a style="width: 80px;" href="/msg/pushRecordDetailView?id={{id}}" class="btn btn-success">查看详情</a></td>
            </tr>
        </script>
        </tbody>
    </table>
</div>
<#--<div align="center">-->
<#--<#include "../footer.ftl"/>-->
<#--</div>-->
<script type="text/javascript" src="/common/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/common/js/bootstrap-table.20130913.js"></script>
<script type="text/javascript" src="/common/js/dateformat.js"></script>
<script type="text/javascript" src="/common/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
    $(function () {
        var param = $("#form").serialize();
        var s = $("#resultTable").bsTable({
            url: '/msg/notifyList.json',
            ajaxType: "POST",  //ajax 提交方式 post 或者 get
            pageNo: 1,
            pageNoAlias: 'page',
            pageSize: 10,
            pageSizeAlias: 'pageSize',
            pagingAlign: "right",
            param: param,
            countRoot: "total",
            dataRoot: "list"
        });

        $("#searchBtn").on('click', function () {
            var param = $("#form").serialize();
            s.reload(param);
        });

//        window.onresize = function () {
//            window.top.autoIFrame();
//        }
    });
</script>
</body>
</html>